@model AlphaWebsite.Models.UserPersonalInformation

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.Role)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Role)
    @Html.ValidationMessageFor(model => model.Role)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.FirstName)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.FirstName)
    @Html.ValidationMessageFor(model => model.FirstName)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.LastName)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.LastName)
    @Html.ValidationMessageFor(model => model.LastName)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.ScreenName)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.ScreenName)
    @Html.ValidationMessageFor(model => model.ScreenName)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.EmailAddress)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.EmailAddress)
    @Html.ValidationMessageFor(model => model.EmailAddress)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Address1)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Address1)
    @Html.ValidationMessageFor(model => model.Address1)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Address2)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Address2)
    @Html.ValidationMessageFor(model => model.Address2)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.HomePhone)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.HomePhone)
    @Html.ValidationMessageFor(model => model.HomePhone)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.MobilePhone)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.MobilePhone)
    @Html.ValidationMessageFor(model => model.MobilePhone)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.WorkPhone)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.WorkPhone)
    @Html.ValidationMessageFor(model => model.WorkPhone)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Ext)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Ext)
    @Html.ValidationMessageFor(model => model.Ext)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Fax)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Fax)
    @Html.ValidationMessageFor(model => model.Fax)
</div>

<div class="editor-label">
    City
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.CityID, ((IEnumerable<AlphaWebsite.Models.City>)ViewBag.PossibleCities).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.CityID.ToString(),
        Selected = (Model != null) && (option.CityID == Model.CityID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.CityID)
</div>
<div class="editor-label">
    District
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.DistrictID, ((IEnumerable<AlphaWebsite.Models.CityDistrict>)ViewBag.PossibleDistricts).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.DistrictID.ToString(),
        Selected = (Model != null) && (option.DistrictID == Model.DistrictID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.DistrictID)
</div>
